//
//  zhucetextfield.m
//  hainingOASystem
//
//  Created by michael on 2017/12/14.
//  Copyright © 2017年 czd. All rights reserved.
//

#import "zhucetextfield.h"

@implementation zhucetextfield
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
               [self setValue:[UIFont boldSystemFontOfSize:13] forKeyPath:@"_placeholderLabel.font"];
               [self setValue:[UIColor colorWithHexString:@"aeaeae"] forKeyPath:@"_placeholderLabel.textColor"];
self.font = [UIFont systemFontOfSize:13.f];
                self.layer.cornerRadius=8.0f;
        self.backgroundColor = [UIColor whiteColor];
   self.layer.masksToBounds=YES;
//    self.layer.borderColor=[[UIColor colorWithHexString:@"aeaeae"]CGColor];
    self.layer.borderColor=[[UIColor  blackColor]CGColor];

    self.layer.borderWidth= 1.0f;
[self test];
    }
    return self;
}
-(void)test
{
    //监听开始编辑状态
//    [self addTarget:self action:@selector(didediting) forControlEvents:UIControlEventEditingDidBegin];// 可在自定义selector处
//    //监听编辑完成的状态
//    [self addTarget:self action:@selector(endediting) forControlEvents:UIControlEventEditingDidEnd];// 可在自定义selector处
}
-(void)didediting
{
    NSLog(@"开始编辑");
}

-(void)endediting
{
    NSLog(@"停止编辑");
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
